/**
 *Copyright (c) 2024 watereyes
 * safetymanagement is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.system.service.api;


import com.koron.common.domain.DataBean;
import com.koron.system.bean.DistrictAndCorp;
import com.koron.system.domain.District;
import com.koron.system.domain.DistrictCorpRelation;
import org.swan.bean.MessageBean;

import java.util.List;

public interface DistrictService {
    /**
     * 保存片区信息和片区关联的水司
     * @param districtAndCorp
     * @return
     */
    MessageBean<Integer> save(DistrictAndCorp districtAndCorp);

    /**
     * 删除片区信息
     * @param id
     * @return
     */
    MessageBean<Integer> deleteDistrict(String id);

    /**
     * 根据主键获取片区信息
     * @param id
     * @return
     */
    MessageBean<District> queryOne(String id);

    /**
     * 根据code查询片区信息
     * @param code
     * @return
     */
    MessageBean<District> queryOneByCode(String code);

    /**
     * 删除片区与水司的之间关联
     * @param idList
     * @return
     */
    MessageBean<Integer> deleteDistrictCorp(List<String> idList);

    /**
     * 获取片区信息列表
     * @param start
     * @param rows
     * @return
     */
    MessageBean<DataBean<District>> queryAllDistrict(Integer start,Integer rows);

    /**
     * 根据片区code获取片区下关联的水司
     * @param ditrictCode
     * @param start
     * @param rows
     * @return
     */
    MessageBean<DataBean<DistrictCorpRelation>> queryDistrictCorp(String ditrictCode,Integer start,Integer rows);


    /**
     * @param ditrictCode
     * @return
     */
    List<DistrictCorpRelation> queryAssociatedCorp(String ditrictCode);

}
